package com.byedu.domain.course;

import java.io.Serializable;


/**
 * Created by Luo on 2017-04-25.
 */
public class AnswerDO implements Serializable {
	private static final long serialVersionUID = 5337614678699309965L;
	
	public AnswerDO () {}

    public AnswerDO (String subOption, String content, String uniqueKey) {
        this.subOption = subOption;
        this.content = content;
        this.uniqueKey = uniqueKey;
    }
	
	/*答案编号*/
    private Integer id;
    /*选项*/
    private String subOption;
    /*选项内容*/
    private String content;
    /*是否为标准答案*/
    private boolean correct;
    /*考题编号*/
    private int questionId;
    /*唯一标识  属于冗余字段*/
    private String uniqueKey;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSubOption() {
        return subOption;
    }

    public void setSubOption(String subOption) {
        this.subOption = subOption;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean isCorrect() {
        return correct;
    }

    public void setCorrect(boolean correct) {
        this.correct = correct;
    }

    public int getQuestionId() {
        return questionId;
    }

    public void setQuestionId(int questionId) {
        this.questionId = questionId;
    }

    public String getUniqueKey() {
        return uniqueKey;
    }

    public void setUniqueKey(String uniqueKey) {
        this.uniqueKey = uniqueKey;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AnswerDO answerDO = (AnswerDO) o;

        if (id != null ? !id.equals(answerDO.id) : answerDO.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "AnswerDO{" +
                "id=" + id +
                ", subOption=" + subOption +
                ", content='" + content + '\'' +
                ", correct=" + correct +
                ", questionId=" + questionId +
                ", uniqueKey=" + uniqueKey +
                '}';
    }
}
